public class MachineBuilder {
    private String name;

    private int width;

    private int weight;

    private int height;

    private int powder;

    private String cpu;

    public MachineBuilder() {
    }

    public MachineBuilder name(String name) {
        this.name = name;
        return this;
    }

    public MachineBuilder width(int width) {
        this.width = width;
        return this;
    }

    public MachineBuilder weight(int weight) {
        this.weight = weight;
        return this;
    }

    public MachineBuilder height(int height) {
        this.height = height;
        return this;
    }

    public MachineBuilder powder(int powder) {
        this.powder = powder;
        return this;
    }

    public MachineBuilder cpu(String cpu) {
        this.cpu = cpu;
        return this;
    }

    public Machine build() {
        Machine machine = new Machine();
        machine.setName(this.name);
        machine.setWidth(this.width);
        machine.setWeight(this.weight);
        machine.setHeight(this.height);
        machine.setPowder(this.powder);
        machine.setCpu(this.cpu);
        return machine;
    }
}
